package com.example.litingting.adapterdemo;

import android.app.ListActivity;
import android.os.Bundle;
import android.os.PersistableBundle;
import android.util.Log;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.TextView;

/**
 * Created by litingting on 2016/3/21.
 */
public class MyListActivity extends ListActivity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        ArrayAdapter<String>adapter = new ArrayAdapter<String>(this,android.R.layout.simple_list_item_1,
        new String[]{"abc","aaa"});
    }

    @Override
    protected void onListItemClick(ListView l, View v, int position, long id) {
        Log.i("li",((TextView)v).getText().toString()+"......................");
    }
}
